<script lang="ts" setup>
import type { ResetPasswordParams } from '@vben/common-ui';

import { ref, onMounted, reactive } from 'vue';

import { AuthenticationResetPassword } from '@vben/common-ui';
import { LOGIN_PATH } from '@vben/constants';
import { useAuthStore } from '#/store';
import { uctoo_config } from '#/store';
import { useRepo } from 'pinia-orm';
import { useAxiosRepo } from '@pinia-orm/axios';
import { useRoute } from 'vue-router';
// 获取当前路由信息
const route = useRoute();
// 获取查询字符串部分
let queryParam = reactive({ ...route.query });

defineOptions({ name: 'ResetPassword' });

const loading = ref(false);

function handleSubmit(value: ResetPasswordParams) {
  // eslint-disable-next-line no-console
  console.log('register submit:', value);
}
const authStore = useAuthStore();
const showVerifyCode = ref(true);
onMounted(async () => {

});
</script>

<template>
  <AuthenticationResetPassword
    :loading="loading"
    :login-path="LOGIN_PATH"
    verify-qr-code="https://imeal.weiyoho.com/assets/qrcode/verify.png"
    :showVerifyCode=showVerifyCode
    :verifyCode="queryParam?.verifyCode"
    :user_id="queryParam?.user_id"
    @submit="authStore.authResetPassword"
  />
</template>
